#include "shm.hpp"
#include "fifo.hpp"
#include <unistd.h>

int main()
{
    Shm s(PATH, keynum, USER);
    Openfifo opf(PATH, NAME);
    opf.open_for_read();
    char *arr = (char *)s.GetStr();
    while (1)
    {
        if (opf.wakeup())
        {
            printf("%s\n", (char *)s.GetStr());
            sleep(2);
        }
        else break;
    }

    return 0;
}